package com.ag.zrt.action;

import javax.annotation.Resource;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ag.common.AgException;
import com.ag.common.BaseAction;
import com.ag.zrt.service.ILogPsContentService;

@Controller("logPsContentAction")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class LogPsContentAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5435770899832928415L;
	@Resource(name = "LogPsContentService")
	private ILogPsContentService logPsContentService;
	private String newStepId;
	private String newContent;
	private String typeId;

	public String getNewContent() {
		return newContent;
	}

	public void setNewContent(String newContent) {
		this.newContent = newContent;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public String getNewStepId() {
		return newStepId;
	}

	public void setNewStepId(String newStepId) {
		this.newStepId = newStepId;
	}

	public void setLogPsContentService(ILogPsContentService logPsContentService) {
		this.logPsContentService = logPsContentService;
	}

	public String add() {
		try {
			logPsContentService.add(newStepId,newContent,typeId);
		} catch (AgException e) {
			e.printStackTrace();
			throw e;
		}
		return "add_succ";

	}

}
